package com.chen.tliaswebtest.utils;

/**
 * @author chen
 * @version 1.0
 * @create_date 2025/7/27
 * 用于模糊查询的安全替换工具类
 */
public class EscapeUtils {
    private EscapeUtils() {
    }

    public static String escapeLikePattern(String pattern) {
        if (pattern == null) {
            return null;
        }
        return pattern.replace("\\", "\\\\")
                .replace("%", "\\%")
                .replace("_", "\\_");
    }
}
